import * as types from '../types'
export default {
    // 同步方法
    [types.SET_AUDIO] (state, preload) {
        state.audio = preload
    },
    [types.SET_SONG_MSG] (state,preload) {
        state.songMsg = preload
    },
    [types.UPDATE_SONG_MSG] (state,preload) {
        state.songMsg = Object.assign({},state.songMsg,preload);//必须加{}否则还是原先引用
    },
    [types.SET_SONG_LIST] (state,preload) {
        state.playList = preload;
        console.log(state.playList)
    },
};
